package 算法.leetcode.labuladong.数组和链表;

/**
 * @author lchenglong
 * @date 2022/6/16
 */
public class 反转字符串 {
    class Solution {
        public void reverseString(char[] s) {
            if (s == null ||s.length<1)return;
            int left = 0,right = s.length-1;
            while (left<right){
                char tmp = s[left];
                s[left] = s[right];
                s[right] = tmp;
                left++;
                right--;
            }
        }
    }
}
